<?php

namespace app\model;

use think\Model;

class User extends Model
{
    //
    public function getStatusTextAttr($value,$data)
    {
        $arr = [-1=>'del',0=>'ban',1=>'normal'];
        return $arr[$data['status']];
    }

    public function getGenderTextAttr($value,$data)
    {
        $arr = [0=>'female',1=>'male'];
        return $arr[$data['gender']];
    }
}
